package com.ldk.springboot2021.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller//ajax json
//@RestController=@ResponseBody+@Controller
//控制层的类，且交给Spring管理

public class TestController {

    @RequestMapping("/t1")
    public String toTestPage(){
        return "test";//视图名称  默认是转发，冲顶显示redirect
    }
}
